{extend name="main/index" /}
{block name="main"}

<div class="content-page">
    <div class="content">
        
   		<h2 class="text-muted">您所在的位置:banner</h2>
       	<!-- Button trigger modal -->
        <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
 			添加Banner图
        </button>

<!-- Modal -->
        <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">添加Banner图</h4>
            </div>
            <div class="modal-body">
           	<!-- formstar-->
            <form action="{:url('/admin/bannersave')}"  method="post" enctype="multipart/form-data">
                   
                    <div class="form-group">
                      <label for="exampleInputFile">选择图片</label>
                      <input type="file" id="exampleInputFile" name="banner"> 
                    </div>
                    <button type="submit" class="btn btn-default">Submit</button>
            </form>
            <!-- formend-->
            </div>
        </div>
        </div>
        </div>
        <table class="table table-hover">
		 <tr>
                        <th>BANID</th>
                        <th>banner图片</th>
                        <th class="col-md-6">小说链接</th>
                        <th>操作</th>

                    </tr>
                    
                    {volist name="xlist" id="v" key="k"}
                    <tr>
                        <td>{$v['banid']}</td>
                        <td><img src="{$v['banner']}" width="100" height="100"></td>
                        <td>目前为空</td>
                        
                        <td>
                        <a href="{:url('/bannerdel',['id'=>$v['banid']])}"><button type="button" class="btn btn-danger">删除</button></a>
                        </td>   
                    </tr>
                    {/volist}
                    
                    
		</table>
      

    </div>
</div>

{/block}